package com.kc.business.service;

import com.kc.business.domain.order.dto.BizOrderStatisticsByAgeSectionDTO;
import com.kc.business.domain.order.dto.BizOrderStatisticsIncomeDetailsDTO;
import com.kc.business.domain.order.dto.BizSaleRankingDTO;
import com.kc.business.domain.order.entity.BizCancelOrderStatistics;
import com.kc.business.domain.order.entity.BizOrderStatistics;
import com.kc.business.domain.query.BizOrderStatisticsQuery;
import com.kc.business.domain.vo.KcUserStatisticsVO;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * @ClassName BizOrderStatisticsData
 * @Description TODO
 * @Author wangdongliang
 * @Date 2021/5/28 15:35
 */
public interface BizOrderStatisticsDataService {
    /**
     * 获取销售数据
     * @param bizOrderStatisticsQuery
     * @return
     */
    List<BizOrderStatistics> getSaleData(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 取消订单
     * @param bizOrderStatisticsQuery
     * @return
     */
    List<BizCancelOrderStatistics> getCancelData(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 获取退款数据
     * @param bizOrderStatisticsQuery
     * @return
     */
    List<BizCancelOrderStatistics> getRefundData(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 按周获取销售数据(获取近7天销售数据)
     * @return
     */
    int getSaleDateByWeek(String attributeName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 按月获取销售数据(获取近30天销售数据)
     * @return
     */
    int getSaleDateByMonth(String attributeName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 按周获取取消订单数据(获取近7天销售数据)
     * @return
     */
    int getCancelOrderDateByWeek(String attributeName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 按月获取取消订单数据(获取近30天销售数据)
     * @return
     */
    int getCancelOrderDateByMonth(String attributeName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 按周获取退款订单数据(获取近7天销售数据)
     * @return
     */
    int getRefundOrderDateByWeek(String attributeName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 按月获取退款订单数据(获取近30天销售数据)
     * @return
     */
    int getRefundOrderDateByMonth(String attributeName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 获取天数
     * @param bizOrderStatisticsQuery
     * @return
     */
    int getDays(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 对数据进行求和
     * @param data
     * @return
     */
    int getSun(List<String> data);

    /**
     * 获取订单总金额
     * @return
     */
    List<KcUserStatisticsVO> getOrderMoney(BizOrderStatisticsQuery bizOrderStatisticsQuery);
    /**
     * 获取已支付订单总金额
     * @return
     */
    List<KcUserStatisticsVO> getAllPayOrderMoney(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 销售排名
     * @param bizOrderStatisticsQuery
     * @return
     */
    List<BizSaleRankingDTO> getSaleRanking(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 销售收入列表
     * @param bizOrderStatisticsQuery
     * @return
     */
    List<BizOrderStatisticsIncomeDetailsDTO> getSaleIncomeList(BizOrderStatisticsQuery bizOrderStatisticsQuery);

    /**
     * 按照年龄统计
     * @param bizOrderStatisticsQuery
     * @return
     */
    List<BizOrderStatisticsByAgeSectionDTO> getSaleStatisticsByAge(BizOrderStatisticsQuery bizOrderStatisticsQuery);
}
